package com.swu.pad.comment.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@Table(name = "comment")
/**
 * 组内评论实体
 * @author yuge
 *
 */
public class Comment {
	@Id
	@Column(name = "id")
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	private String id;
	// 评论问题ID
	@Column(name = "question_id")
	private String questionId;
	// 打分
	@Column(name = "score")
	private String score;
	// 评论时间
	@Column(name = "comment_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date commentTime;
	// 评论类型
	@Column(name = "comment_type")
	private String commentType;
	// 评论人
	@Column(name = "commenter_id")
	private String commenterId;
	// 评论对象
	@Column(name = "assignmentpad_id")
	private String assignmentPadId;
	// 评论对象作者
	@Column(name = "author_id")
	private String authorId;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}

	public String getScore() {
		return score;
	}

	public void setScore(String score) {
		this.score = score;
	}

	public Date getCommentTime() {
		return commentTime;
	}

	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}

	public String getCommentType() {
		return commentType;
	}

	public void setCommentType(String commentType) {
		this.commentType = commentType;
	}

	public String getCommenterId() {
		return commenterId;
	}

	public void setCommenterId(String commenterId) {
		this.commenterId = commenterId;
	}

	public String getAssignmentPadId() {
		return assignmentPadId;
	}

	public void setAssignmentPadId(String assignmentPadId) {
		this.assignmentPadId = assignmentPadId;
	}

	public String getAuthorId() {
		return authorId;
	}

	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}

}
